<?php

	include("../common/connect.php");
	session_start();
	$post = $_POST;
	$userid = $_SESSION['userid'];
	$wannaType = $post["wannaType"];
	$wannaDescription = $post["wannaDescription"];
	$longtitude = $post["longtitude"];
	$latitude = $post["latitude"];
	$query="INSERT INTO `meixuejia`.`wanna` (`ID`, `userID`, `wannaType`, `WannaDescription`, `CreateTime`, `Status`, `latitude`, `longtitude`) VALUES (NULL, '".$userid."', '".$wannaType."', '".$wannaDescription."', CURRENT_TIMESTAMP, '0', '".$latitude."', '".$longtitude."');";


	$result = mysql_query($query) or die("Query failed");
	echo "<script language='Javascript'>";        
	echo "window.location = \"../wanna/main.php\";";
    echo "</script>";
?>